<?php
/*========================================= JooSam =========================================/
/																							/
/	Extention:		JooSam																	/
/	Created by:		Broadcastweb.eu - Paules												/
/	Site:			http://www.broadcastweb.eu												/
/	Email:			support@broadcastweb.eu													/
/	Copyright:		2011 - 2012 (c) Broadcastweb.eu											/
/	License:		CC BY-NC-ND 3.0 ~ http://creativecommons.org/licenses/by-nc-nd/3.0/		/
/	File Version:	0003																	/
/																							/
/========================================== JooSam ========================================*/

// Joomla security
defined('_JEXEC') or die;

// Import Joomla Data
JHtml::_('behavior.tooltip');
$srvActive = $this->srvActive;
$srvOnEdit = $this->srvOnEdit;
?>
<table class="jsmRight" style="float:right;min-width:120px;border:none;margin:0 0 10px 10px;padding:0;">
	<tr>
		<th class="jsm_TableHead" colspan="2" style="font-size:13px; color:#0080ff;"><?php echo JText::_('COM_JOOSAM_VIEWS_TEXTCODES_003'); ?></th>
	<tr>
		<td class="jsm_label" style="font-size:11px; font-weight:bold; width:90px;"><?php echo JText::_('COM_JOOSAM_VIEWS_TEXTCODES_004'); ?>: </td>
		<td class="jsm_value" style="font-size:12px; color:#ff8000; font-weight:bold;"><?php echo $srvActive['name']; ?></td>
	</tr>
	<tr>
		<td class="jsm_label" style="font-size:11px; font-weight:bold; width:90px;"><?php echo JText::_('COM_JOOSAM_VIEWS_TEXTCODES_005'); ?>: </td>
		<td class="jsm_value" style="font-size:12px; color:#ff8000; font-weight:bold;"><?php echo $srvOnEdit['name']; ?></td>
	</tr>
</table>
<div class="clr"></div>
<!-- Form start -->
<form action="<?php echo JRoute::_('index.php?option=com_joosam&view=textcodes'); ?>" method="post" name="adminForm" id="adminForm">
	<fieldset class="jsm_fieldset">
		<table class="adminlist">
			<thead>
				<tr>
					<th width="5"><?php echo JText::_('COM_JOOSAM_VIEWS_TEXTCODES_006'); ?></th>
					<th width="35"><?php echo JText::_('COM_JOOSAM_VIEWS_TEXTCODES_007'); ?></th>
					<th width="60"><?php echo JText::_('COM_JOOSAM_VIEWS_TEXTCODES_008'); ?></th>
					<th><?php echo JText::_('COM_JOOSAM_VIEWS_TEXTCODES_009'); ?></th>
				</tr>
			</thead>
			<tbody>
				<?php if(is_array($this->items) and array_key_exists('0', $this->items)):
					foreach($this->items as $i => $item): ?>
						<tr class="row<?php echo $i % 2; ?>">
					<!--1--><td class="center">
								<?php echo $item->id; ?>
							</td>
					<!--2--><td style="text-align:center; padding:0 0 0 15px;">
								<?php echo JHtml::_('grid.id', $i, $item->id); ?>
							</td>
					<!--3--><td class="center">
								<?php echo $item->txt_code; ?>
							</td>
					<!--5--><td><?php
								$txtstr = $item->txt_string;
								$textout = JText::_($item->txt_string);
								if($txtstr == $textout){
									echo $txtstr;
								} else{
									echo '<span title="'.$txtstr.'">'.$textout.'</span>';
								} ?>
							</td>
						</tr>
					<?php endforeach;
				else: ?>
					<tr>
						<td class="jsm_nodata" colspan="5" style="text-align:center;"><?php echo JText::_('COM_JOOSAM_VIEWS_TEXTCODES_010'); ?></td>
					</tr><?php
				endif; ?>
			</tbody>
			<tfoot>
				<tr>
					<td colspan="5"><?php
							if(is_array($this->items)):
							echo $this->pagination->getListFooter();
							endif;
						?>
					</td>
				</tr>
			</tfoot>
		</table>
	</fieldset>
	<div>
		<input type="hidden" name="task" value="" />
		<input type="hidden" name="boxchecked" value="0" />
		<?php echo JHtml::_('form.token'); ?>
	</div>
</form>
<div class="clr"></div>